import os
import platform 

LIBS_DIR = os.environ['LIBS_DIR'];

sources = [
    'cairo-arc.c',
    'cairo-array.c',
    'cairo-atomic.c',
    'cairo-bentley-ottmann-rectangular.c',
    'cairo-bentley-ottmann-rectilinear.c',
    'cairo-bentley-ottmann.c',
    'cairo-boxes-intersect.c',
    'cairo-boxes.c',
    'cairo.c',
    'cairo-cache.c',
    'cairo-clip-boxes.c',
    'cairo-clip-polygon.c',
    'cairo-clip-region.c',
    'cairo-clip-surface.c',
    'cairo-clip-tor-scan-converter.c',
    'cairo-clip.c',
    'cairo-color.c',
    'cairo-composite-rectangles.c',
    'cairo-compositor.c',
    'cairo-contour.c',
    'cairo-damage.c',
    'cairo-default-context.c',
    'cairo-device.c',
    'cairo-error.c',
    'cairo-font-face.c',
    'cairo-font-options.c',
    'cairo-ft-font.c',
    'cairo-scaled-font.c',
    'cairo-freed-pool.c',
    'cairo-freelist.c',
    'cairo-gstate.c',
    'cairo-hash.c',
    'cairo-hull.c',
    'cairo-png.c',
    'cairo-image-compositor.c',
    'cairo-image-source.c',
    'cairo-image-surface.c',
    'cairo-mask-compositor.c',
    'cairo-matrix.c',
    'cairo-misc.c',
    'cairo-mono-scan-converter.c',
    'cairo-no-compositor.c',
    'cairo-observer.c',
    'cairo-output-stream.c',
    'cairo-path-bounds.c',
    'cairo-path-fill.c',
    'cairo-path-fixed.c',
    'cairo-path-in-fill.c',
    'cairo-path-stroke-boxes.c',
    'cairo-path-stroke-polygon.c',
    'cairo-path-stroke-tristrip.c',
    'cairo-path-stroke.c',
    'cairo-path.c',
    'cairo-pattern.c',
    'cairo-pen.c',
    'cairo-line.c',
    'cairo-rectangle.c',
    'cairo-polygon-intersect.c',
    'cairo-polygon-reduce.c',
    'cairo-polygon.c',
    'cairo-rectangular-scan-converter.c',
    'cairo-region.c',
    'cairo-shape-mask-compositor.c',
    'cairo-slope.c',
    'cairo-spans-compositor.c',
    'cairo-spans.c',
    'cairo-spline.c',
    'cairo-stroke-dash.c',
    'cairo-stroke-style.c',
    'cairo-surface-offset.c',
    'cairo-surface-snapshot.c',
    'cairo-surface.c',
    'cairo-tor-scan-converter.c',
    'cairo-tor22-scan-converter.c',
    'cairo-path-stroke-traps.c',
    'cairo-traps-compositor.c',
    'cairo-traps.c',
    'cairo-tristrip.c',
    'cairo-unicode.c',
    'cairo-version.c',
    'cairo-wideint.c'
]

env=DefaultEnvironment().Clone()
env.Library(os.path.join(LIBS_DIR, 'cairo'), sources,
     CCFLAGS = env['CCFLAGS'] + ' -DHAVE_CONFIG_H=1 -Wno-missing-field-initializers -Wno-attributes -fPIC')
